<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:72:"/data/www/sfadmin/public/../application/admin/view/admin_user/index.html";i:1488527668;s:69:"/data/www/sfadmin/public/../application/admin/view/template/base.html";i:1488527668;}*/ ?>
﻿<head>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="__LIB__/Hui-iconfont/1.0.7/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/app.css"/>
    
    <link href="//cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>

<nav class="breadcrumb">
    <div id="nav-title"></div>
    <!-- <a class="btn btn-success radius r btn-refresh" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新"><i class="Hui-iconfont"></i></a> -->
</nav>



<div class="pd-10 mt-30 master">
	<!-- 按钮组 -->
	<div class="cl pd-5 bg-1 bk-gray"> 
		<?php if(showAuth('admin/AdminUser/add')): ?>
			<span class="f-l mr-5">
				<a class="btn btn-primary radius add-btn" data-title="添加用户" data-url="<?php echo url('add'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加用户</a>
			</span>
		<?php endif; if(showAuth('admin/AdminUser/batch_proc')): if(showAuth('admin/AdminUser/delete')): ?>
				<span class="f-l mr-5">
					<a class="btn btn-danger batch-btn radius" data-title="删除" data-type="delete" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
				</span>
			<?php endif; ?>

			<span class="f-l mr-5">
				<a class="btn btn-danger-outline batch-btn radius" data-title="禁用" data-type="disable" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe631;</i> 批量禁用</a>
			</span> 

			<span class="f-l mr-5">
				<a class="btn btn-success-outline batch-btn radius" data-title="恢复" data-type="enable" data-url="<?php echo url('batch_proc'); ?>" href="javascript:;"><i class="Hui-iconfont">&#xe6a8;</i> 批量恢复</a>
			</span> 
		<?php endif; ?>
	</div>
	<!-- 搜索框 -->
	<div class="pd-5 bg-1 bk-gray">
		<form action="<?php echo url('/admin/admin_user/index'); ?>" class="form-inline" role="form" id="search-form">
			<input name="username" value="<?php echo $username; ?>" type="text" class="form-control"  placeholder="用户名称">

			<div class="form-group">
				<input type="text" class="form-control datepicker-style start" name="start" value="<?php echo $start; ?>" placeholder="最后登录时间开始" readonly />
				~ 
				<input type="text" class="form-control datepicker-style stop" name="stop" value="<?php echo $stop; ?>" placeholder="最后登录时间结束" readonly />
			</div>

			<div class="radio-box">
				<input type="radio" id="s-1" name="status" value="1" <?php echo !empty($status) && $status==1?'checked' : ''; ?>>
				<label for="s-1">启用</label>
			</div>
			<div class="radio-box">
				<input type="radio" id="s-2" name="status" value="2" <?php echo !empty($status) && $status==2?'checked' : ''; ?>>
				<label for="s-2">禁用</label>
			</div>

			<button type="submit" class="btn btn-secondary radius">搜索  </button>
			<button type="button" class="btn btn-default radius btn-reset">重置  </button>

		</form>
	</div>
	<!-- 主列表 -->
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr>
				<th scope="col" colspan="6" class="text-c"><h3>用户列表</h3></th>
			</tr>
			<tr class="text-c">
				<th width="10%">
				    <input type="checkbox" id="checkbox-1" class="select_all">
				    <label for="checkbox-1">全选</label>
				</th>
				<th>帐号</th>
				<th>登录次数</th>
				<th>最后登录时间</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
			<tbody>
		<?php if(is_array($info) || $info instanceof \think\Collection): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
				<tr class="text-c">
					<td class="text-c" width="5%"><input type="checkbox" name="user_id[]" class="ic-checkbox index-chkbox" value="<?php echo $v['id']; ?>" /></td>
					<td><?php echo $v['username']; ?></td>
					<td><?php echo $v['login_count']; ?></td>
					<td><?php echo date("Y-m-d H:i:s",$v['last_login_time']); ?></td>
					<td><?php echo !empty($v['status'])?'<span class="label label-success radius">启用</span>' : '<span class="label label-danger radius">禁用</span>'; ?></td>
					<td >
						<?php if(showAuth('admin/AdminUser/details')): ?>
							<input class="btn btn-primary  radius  size-S details-btn" type="button" data-url="<?php echo url('details',['id'=>$v['id']]); ?>" data-title="详情" value="详情">
						<?php endif; if(showAuth('admin/AdminUser/edit')): ?>
							<input class="btn btn-default  radius  size-S edit-btn" data-url="<?php echo url('edit',['id' => $v['id']]); ?>"  type="button"  value="编辑">
						<?php endif; if(showAuth('admin/AdminUser/delete')): if($v['isdelete']): ?>
								<input class="btn btn-danger radius  size-S delete-btn" data-url="<?php echo url('delete'); ?>" data-id="<?php echo $v['id']; ?>" type="button" value="删除">
							<?php endif; endif; ?>

					</td>
				</tr>
		<?php endforeach; endif; else: echo "" ;endif; ?>
			</tbody>
	</table>
	<!-- 分页 -->
	<div class="ml-10">
	    <?php echo $info->render(); ?>
	</div>
</div>




<script type="text/javascript">
    var PUBLIC = '__PUBLIC__';
    var REQUIRE__JS = '__REQUIRE__JS__';
</script>
<!--require Js -->
<script src="__REQUIRE__JS__/require.config.js"></script>
<script src="__REQUIRE__JS__/require.js"></script>
<script src="__PUBLIC__/common/js/functions.js"></script>

	<script type="text/javascript" src="__AJS__/admin_user/index.js"></script>

</body>
